if on1==0 and oil1<0.32 then
		if P1==0 then set(oil_temp1, oil1+(T-oil1*244)/244*FT*W) 
		elseif P1==1 then set(oil_temp1, oil1+FT*S/244)	
		end
		R1=0
	elseif on1==0 and oil1>0.32 then
		R1=1
	end
	
	if on1==1 and oil1>0.32 then R1=2 end
	
	if P1==1 and on1==1 then set(oil_temp1, oil1+FT*Q/244) end
	
	--------------------------------------------------------
	
	if on2==0 and oil2<0.32 then
		if P2==0 then set(oil_temp2, oil2+(T-oil2*244)/244*FT*W) 
		elseif P2==1 then set(oil_temp2, oil2+FT*S/244)	
		end
		R2=0
	elseif on2==0 and oil2>0.32 then
		R2=1
	end
	
	if on2==1 and oil2>0.32 then R2=2 end
	
	if P2==1 and on2==1 then set(oil_temp2, oil2+FT*Q/244) end
	--------------------------------------------------------
	
	if on3==0 and oil3<0.32 then
		if P3==0 then set(oil_temp3, oil3+(T-oil3*244)/244*FT*W) 
		elseif P3==1 then set(oil_temp3, oil3+FT*S/244)	
		end
		R3=0
	elseif on3==0 and oil3>0.32 then
		R3=1
	end
	
	if on3==1 and oil3>0.32 then R3=2 end
	
	if P3==1 and on3==1 then set(oil_temp3, oil3+FT*Q/244) end